package com.bw.ppjokeplay.common.mvvm.viewmodel

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent

/**
 * ViewModel层接口
 * */
interface IViewModel : LifecycleObserver {

    //创建
    @OnLifecycleEvent(value = Lifecycle.Event.ON_CREATE)
    fun create()

    //销毁
    @OnLifecycleEvent(value = Lifecycle.Event.ON_DESTROY)
    fun destrory()
}